package com.demo.api.service.dept;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.api.vo.dept.DeptVo;
import com.demo.client.model.user.SysDept;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Tan-Bowen
 * @version 1.0
 * @description TODO
 * @date 2021/8/24 16:52
 */
public interface IDeptService {
    /**
     * @author Tan-Bowen
     * @description TODO 机构分页
     * @date 2021/8/24 18:07
     * @param [page, select]
     * @paramType [com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.demo.api.model.user.SysDept>, com.demo.api.vo.dept.DeptVo.Select]
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.demo.api.vo.dept.DeptVo.PageList>
     */
    IPage<DeptVo.PageList> deptPage(Page<SysDept> page, DeptVo.Select select);

    /**
     * @author Tan-Bowen
     * @description TODO 机构新增
     * @date 2021/8/24 18:07
     * @param [create]
     * @paramType [com.demo.api.vo.dept.DeptVo.Create]
     */
    void create(DeptVo.Create create);

    /**
     * @author Tan-Bowen
     * @description TODO 机构编辑
     * @date 2021/8/24 18:08
     * @param [update]
     * @paramType [com.demo.api.vo.dept.DeptVo.Update]
     */
    void update(DeptVo.Update update);

    /**
     * @author Tan-Bowen
     * @description TODO 获取当前用户的部门信息以及下级部门信息
     * @date 2021/9/2 17:05
     * @param []
     * @paramType []
     * @return java.util.List<com.demo.api.vo.dept.DeptVo.PageList>
     */
    List<DeptVo.PageList> getUserDept();


    /**
     * @author Tan-Bowen
     * @description TODO 删除部门
     * @date 2021/9/22 16:10
     * @param [deptId]
     * @paramType [java.lang.Long]
     * @return void
     */
    void deleteDept(Long deptId);
}
